package com.eastedu.repository.ktree.mapper;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.eastedu.model.ktree.KnowledgeNodeDTO;
import com.eastedu.repository.ktree.po.KnowledgeNodePO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * The interface Knowledge node mapper.
 *
 * @author 袁松明
 */
@Mapper
@DS("ktree")
public interface KnowledgeNodeMapper extends BaseMapper<KnowledgeNodePO> {
    /**
     * 查找所有的父级GUID
     *
     * @param guids guid列表
     * @return 父级GUID列表 list
     */
    List<String> findParentGuidByGuidIn(@Param("list") List<String> guids);

    /**
     * Find by guid knowledge node dto.
     *
     * @param knowledgeGuid the knowledge guid
     * @return the knowledge node dto
     */
    KnowledgeNodeDTO findByGuid(@Param("guid") String knowledgeGuid);

    /**
     * List chpater node ids list.
     *
     * @param createTime the create time
     * @return the list
     */
    List<String> listChapterNodeIds(@Param("createTime") long createTime);
}
